#ifndef __WEXTFUNC_CPP__
#define __WEXTFUNC_CPP__

#include "whead.h"
#include "wextfunc.h"

namespace WExtFunc {

void msg_timeout(int clientindex, MsgTimeout* pmsg)
{
	CPlayer* player = getPlayerByCIndex(clientindex);
	if (player == 0 || player == g_pSafePlayer) return;
}

void msg_loginfail(int clientindex, MsgLoginFail* pmsg)
{
	wserPrintErr("LoginFail. name:%s key:%s\n", pmsg->name.c_str(), pmsg->key.c_str());
}

void msg_loginsuccess(int clientindex, MsgLoginSuccess* pmsg)
{
	wserPrintMsg("LoginSuccess. dbid:%d name:%s\n", pmsg->playerid, pmsg->playerdata.playerName.c_str());
	for (int i = 0;i < pmsg->itemdata.size();i++) {
		wserPrintMsg("PlayerItem. itemPos:%d itemID:%d\n", pmsg->itemdata[i].itemPos, pmsg->itemdata[i].itemID);
	}
}

}

#endif //__WEXTFUNC_CPP__
